<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!--<meta name="viewport" content="width=device-width, initial-scale=1">-->
        <meta name="viewport" content="initial-scale=1, maximum=1,minimum=1, user-scalable=no" />
        <title>登陆</title>
        <!-- Bootstrap -->
        <link href="__PUBLIC__/h-ui/yuyue/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <link href="__PUBLIC__/h-ui/yuyue/css/base.css" rel="stylesheet">
    </head>
    <body style="background-color: #fff;">
        <div class="logo"><img src="__PUBLIC__/h-ui/yuyue/images/test/logo.jpg" /></div>
        <div class="container-fluid">            
            <div class="ui-form login">
                <div class="form-item btmborder clearfix">
                    <img src="__PUBLIC__/h-ui/yuyue/images/phone.png" class="pull-left" />
                    <input type="text" class="width" name="phone" id="phone" placeholder="请输入手机号" />
                </div>
                <div class="form-item btmborder clearfix">
                    <img src="__PUBLIC__/h-ui/yuyue/images/pwd.png" class="pull-left" />
                    <input type="password" class="width" name="pwds" id="pwds" placeholder="请输入密码" />
                </div>                
                <div class="form-item" style="margin-top: 70px;">
                    <a href="javascript:void(0);" class="link link-login">登 录</a>
                    <a href="register.html" class="link link-register" style="margin-top: 20px;">注 册</a>
                </div>               
            </div>
        </div>
    </body>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script type="text/javascript" src="__PUBLIC__/h-ui/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/h-ui/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            //获取验证码
            $(".link-login").on('click', function(){
                var phone = $("#phone").val();
                if(phone.length <= 0){
                    layer.msg('请输入手机号码', {icon: 5, time: 2000});
                    return false;
                }

                var pwds = $("#pwds").val();
                if(pwds.length <= 0){
                    layer.msg('请输入登陆密码', {icon: 5, time: 2000});
                    return false;
                }

                //发送请求
                $.post('login.html', {phone: phone, pwds: pwds}, function(row){
                    if(row/1 == 1){
                        location.href = '/xj/yuyue/index.html';
                    }else{
                        layer.msg('登陆密码错误', {icon: 2, time: 2000});
                    }
                });
            });
        });
    </script>
</html>
